﻿<UserControl x:Class="Komunikator.Views.ContactListControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:converter="clr-namespace:Komunikator.Controls"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="200" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    
    <UserControl.Resources>
        <!-- <converter:SexIamgeConverter x:Key="SexImage" Binding Converter={StaticResource SexImage}/>-->

    </UserControl.Resources>
    
    <sdk:DataGrid Name="grdContactList" HeadersVisibility="None" GridLinesVisibility="Horizontal" BorderBrush="Black" BorderThickness="0.4" IsReadOnly="True" ItemsSource="{Binding}" SelectionMode="Single" VerticalScrollBarVisibility="Auto" AutoGenerateColumns="False" Height="auto" Width="200" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
        <sdk:DataGrid.Columns>
            
            <sdk:DataGridTemplateColumn Width="auto">
                <sdk:DataGridTemplateColumn.CellTemplate >
                    <DataTemplate>
                        <Canvas  Margin="4" >
                            <Image Source="../Assets/inc/Preppy.png" />
                        </Canvas>
                    </DataTemplate>
                </sdk:DataGridTemplateColumn.CellTemplate>                
            </sdk:DataGridTemplateColumn>
            
            <sdk:DataGridTemplateColumn Width="*">
                <sdk:DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" Width="auto" >
                            <TextBlock Name="DisplayedContactName" Text="{Binding}" FontFamily="Arial" FontSize="10" FontWeight="Bold" TextAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" ></TextBlock>
                            <TextBlock Name="ContactStatus" Text="{Binding}"  FontFamily="Arial" FontSize="7" FontWeight="Light" TextAlignment="Left" />                            
                        </StackPanel>
                    </DataTemplate>
                </sdk:DataGridTemplateColumn.CellTemplate>
            </sdk:DataGridTemplateColumn>
            
        </sdk:DataGrid.Columns>
        
    </sdk:DataGrid>
</UserControl>
